﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ZLDC.Common.Estate;

namespace ZLDC.Estate
{
                public class CacheHousingFollow
    {
                                                                        public static string Cache_Follow_Json(int page, int pagesize, int housingId, int deptid)
        {
            string json = "";

            string cachekey = CacheConst.CACHE_HOUSING_FOLLOW_JSON + housingId + "_" + page + "_" + pagesize + "_" + deptid;

            if (_Cache.GetCache(cachekey) == null || _Cache.GetCache(cachekey).ToString() == "")
            {
                json = ZLDC.Topo.BLL.Estate.HousingFollowBLL.p_housingFollow_list_table(page, pagesize, housingId, deptid);
                _Cache.SetCache(cachekey, json, CacheConst.CACHE_HOUSING_FOLLOW_JSON_TIME);
            }
            else
                json = _Cache.GetCache(cachekey).ToString();

            return json;
        }

                                                                        public static void Cache_Follow_Json_Clear(int page, int pagesize, int housingId, int deptid)
        {
            string cachekey = CacheConst.CACHE_HOUSING_FOLLOW_JSON + housingId + "_" + page + "_" + pagesize + "_" + deptid;

            _Cache.Remove(cachekey);
        }

    }
}
